﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace MShop.Core.Domain
{
    public partial class aspnet_Roles
    {
        public aspnet_Roles()
        {
            
        }

        partial void OnDescriptionChanged()
        {
            IsPower = CheckIsPower();
        }
        
        public bool IsPower
        {
            get;
            set;
        }

        public bool CheckIsPower()
        {
            if (string.IsNullOrEmpty(this.Description))
            {
                return false;
            }
            return true;
        }

        public int TotalUserCount
        {
            get
            {
               return this.aspnet_Users.Count;
            }
        }
    }
}